package com.qcby.demo.proxyaop.controller;

import com.qcby.demo.proxyaop.aop.ViewRecords;
import com.qcby.demo.proxyaop.web.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: DemoController
 * @description:
 * @author: lxt
 * @create: 2021-05-12 18:10
 **/
@Slf4j
@RestController
@RequestMapping("demo")
public class DemoController {

    @ViewRecords
    @RequestMapping
    public ResultJson index(Long id){
        log.info("id的值为：{}",id);
        String a = "2"+"5555";

        String b = "6666";

        String c = a + b;
        System.out.println(c);
        return ResultJson.ok(id);
    }



    @ViewRecords(id = "id666")
    @RequestMapping("index1")
    public ResultJson index1(Long id666){
        log.info("id666:{}",id666);
        return ResultJson.ok(id666);
    }


}
